//
//  FlashCell.m
//  digitalCurrency
//
//  Created by 默认账户 on 2019/4/3.
//  Copyright © 2019 XinHuoKeJi. All rights reserved.
//

#import "FlashCell.h"

@implementation FlashCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor clearColor];
        [self setUpAllChildView];
    }
    return self;
}

- (void)setUpAllChildView{
    [self.contentView addSubview:self.bgview];
    [self.bgview addSubview:self.imgview];
 
    [self.contentView addSubview:self.titlelabel];

}

- (UILabel *)titlelabel {
    if (!_titlelabel) {
       
        _titlelabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 198, 150, 20)];
        _titlelabel.text = @"watch 3";
        _titlelabel.font = [UIFont systemFontOfSize:14];
        _titlelabel.textColor = UIColorFromRGB(0x404040);
        _titlelabel.textAlignment = NSTextAlignmentCenter;
    }
    
    return _titlelabel;
}

- (UIView *)bgview {
    if (!_bgview) {
        _bgview = [[UIView alloc] init];
        _bgview.layer.cornerRadius = 5;
        _bgview.frame = CGRectMake(0, 10, 150, 180);
        [_bgview setBackgroundColor:[UIColor whiteColor]];
    }
    
    return _bgview;
}

- (UIImageView *)imgview {
    if (!_imgview) {
        _imgview = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"watch01"]];
        _imgview.layer.cornerRadius = 50;
        _imgview.frame = CGRectMake(25, 40, 100, 100);
        [_imgview setBackgroundColor:[UIColor whiteColor]];
    }
    
    return _imgview;
}

@end
